home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 07 - 1991 / 07.02 Feb 91 / 4th Debugger Appl / Debugger / Debugger.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-02-15  |  2.0 KB  |  56 lines  |  [TEXT/KAHL]

  1. /********************************************************************/
  2. /*                                                                    */
  3. /*    Include  - Debugger.h                                            */
  4. /*    Author   - Alexander S. Colwell, Copyright © 1988, 1989            */
  5. /*                                                                    */
  6. /*    Purpose  - This is the "Debugger" desk accessory include file.    */
  7. /*                                                                    */
  8. /*    Revisions - None.                                                */
  9. /*                                                                    */
  10. /********************************************************************/
  11.  
  12. #ifndef _Debugger_
  13. #define    _Debugger_
  14.  
  15. #define    debuggerType    'Dbgr'        /* Debugger resource type        */
  16. #define    debuggerName    "\pDebugger Reference"/* Debugger res name    */
  17.  
  18. typedef enum {                        /* Debugger error types            */
  19.     dbgNoOvrFlw,                    /* No, overflow                    */
  20.     dbgTableOvrFlw,                    /* Table overflow                */
  21.     dbgDataOvrFlw,                    /* Data buffer overflow            */
  22.     dbgBufOvrFlw                    /* Buffer size overflow            */
  23.     } DBGERROR;
  24.     
  25. typedef enum {                        /* Debugger types                */
  26.     accDbgPrint = 128,                /* Perform LSC debugging line    */
  27.     accDbgDump                        /* Perform debugging dump        */
  28.     } DBGTYPE;
  29.  
  30. typedef struct {                    /* Debugger Interface defs        */
  31.     short    daRefNbr;                /* DA's reference number        */
  32.     DBGERROR bufError;                /* Buffer error indicator        */
  33.     long    bufTableIdx;            /* Buffer index                    */
  34.     long    bufNextIdx;                /* Next buffer index            */
  35.     long    bufDataIdx;                /* Buffer data index            */
  36.     long    bufTableSize;            /* Buffer index table size        */
  37.     long    bufDataSize;            /* Buffer data handle size        */
  38.     long    **bufTable;                /* Buffer index table            */
  39.     char    **bufData;                /* Buffer data handle            */
  40.     } DBGINTERFACE;
  41. typedef DBGINTERFACE    *DBGPTR;
  42. typedef    DBGPTR            *DBGHDL;
  43.                                     
  44. #ifdef  DbgPrint                    /* Check if it's defined        */
  45. #undef  DbgPrint                    /* Kill DbgPrint definition        */
  46. #endif
  47.  
  48. DBGHDL    DbgGetRefHdl();                /* Debugging proto-types        */
  49. void    DbgPrint(/* DBGHDL dbgRefHdl, char *fmt, var-args... */);
  50. void    DbgBufPrint(/* DBGHDL dbgRefHdl, char *fmt, var-args... */);
  51. void    DbgDump(DBGHDL dbgRefHdl, char *buffer, long size);
  52. void    DbgBufDump(DBGHDL dbgRefHdl, char *buffer, long size);
  53. long    DbgStrLen(char *str);
  54.  
  55. #endif
  56.